package com.cq.base.test;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;

/**
 * Base class for running DAO tests.
 */
public abstract class BaseNoTxTestCase extends AbstractDependencyInjectionSpringContextTests {
	public static final String VAR_STR = "JunitTest";
	public static final int VAR_INT = 99999;
	protected final Log log = LogFactory.getLog(getClass());

	protected String[] getConfigLocations() {
		// 上下文属性设置
		setProperties();

		// 设置context文件路径
		return getLocations();
	}

	/**
	 * 指定context文件路径
	 */
	protected String[] getLocations() {
		return new String[] { TestConstants.DEFAULT_CONTEXT, TestConstants.DEFAULT_TEST_CONTEXT };
	}

	/**
	 * 设置context属性
	 */
	protected void setProperties() {
		// 设置装备模式
		// setAutowireMode(AUTOWIRE_NO);
		setAutowireMode(AUTOWIRE_BY_NAME);
	}

}
